package com.li.sqlparse.entity;

import java.util.List;
import java.util.Map;

/**
 * 解析 Sql 对象
 */
public class ParseItemDto {

    /**
     * id
     */
    private String id;

    /**
     * 父级id
     */
    private String parentid;

    /**
     * sql 类型
     */
    private String sqlType;

    /**
     * sql 涉及的 create column 和 来源的 column
     */
    private List<String> columnValue;

    /**
     * insert 语句的 column
     */
    private List<String> columns;

    /**
     * insert 语句的values
     */
    private List<String> values;

    /**
     * 子 sql
     */
    private List<ParseItemDto> children;

    /**
     * left join 子句中包含的表和别名
     */
    private List<Map<String, String>> joinTableInfo;

    /**
     * sql 中 from 表名
     */
    private String from;
    /**
     * sql 中 to 表名
     */
    private String to;

    public String getSqlType() {
        return sqlType;
    }

    public void setSqlType(String sqlType) {
        this.sqlType = sqlType;
    }

    public List<String> getColumnValue() {
        return columnValue;
    }

    public void setColumnValue(List<String> columnValue) {
        this.columnValue = columnValue;
    }

    public String getFrom() {
        return from;
    }

    public void setFrom(String from) {
        this.from = from;
    }

    public String getTo() {
        return to;
    }

    public void setTo(String to) {
        this.to = to;
    }

    public List<String> getColumns() {
        return columns;
    }

    public void setColumns(List<String> columns) {
        this.columns = columns;
    }

    public List<String> getValues() {
        return values;
    }

    public void setValues(List<String> values) {
        this.values = values;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }


    public String getParentid() {
        return parentid;
    }

    public void setParentid(String parentid) {
        this.parentid = parentid;
    }

    public List<Map<String, String>> getJoinTableInfo() {
        return joinTableInfo;
    }

    public void setJoinTableInfo(List<Map<String, String>> joinTableInfo) {
        this.joinTableInfo = joinTableInfo;
    }

    public List<ParseItemDto> getChildren() {
        return children;
    }

    public void setChildren(List<ParseItemDto> children) {
        this.children = children;
    }
}
